package com.local.web.util;

import javax.servlet.http.HttpServletRequest;

public class CommonUtil {

    /**
     * 判断当前请求是否是ajax请求
     * @param request
     * @return
     */
    public static boolean isAjaxRequest(HttpServletRequest request) {
        return "XMLHttpRequest".equalsIgnoreCase(request.getHeader("X-Requested-With"));
    }

}
